<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div>
    <ul>
        <!--v-for循环遍历-->
        <li v-for="name in arr">{{name}}</li>
    </ul>
    <table border="1">
        <caption>人物列表</caption>
        <tr>
            <th>编号</th>
            <th>名字</th>
            <th>年龄</th>
            <th>类型</th>
        </tr>
        <tr v-for="(p,i) in persons">
            <td>{{i + 1}}</td>
            <td>{{p.name}}</td>
            <td>{{p.age}}</td>
            <td>{{p.type}}</td>
        </tr>
    </table>
    <table border="1" cellspacing="0" cellpadding="10">
        <tr>
            <th>姓名</th>
            <th>岗位</th>
            <th>工资</th>
            <th>年龄</th>
        </tr>
        <tr v-for="emp in empArr">
            <td>{{emp.name}}</td>
            <td>{{emp.job}}</td>
            <td>{{emp.salary}}</td>
            <td>{{emp.age}}</td>
        </tr>
    </table>
</div>
<script src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script>
<script>
    let v = new Vue({
        el: "body>div",
        data: {
            arr: ["刘备", "关羽", "张飞"],
            persons: [{name: "孙悟空", age: 500, type: "打野"},
                {name: "蓝朋友", age: 100, type: "打野"},
                {name: "赵子龙", age: 50, type: "打野"}],
            empArr: [{name: "张三", job: "销售", salary: "5000", age: 30},
                {name: "李四", job: "销售", salary: "6000", age: 40},
                {name: "王五", job: "销售", salary: "7000", age: 50},
                {name: "赵六", job: "销售", salary: "8000", age: 60}]
        }
    })
</script>
</body>
</html>